package com.service.impl;

import com.mapper.EmpaccountMapper;
import com.pojo.Empaccount;
import com.service.EmpaccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class EmpaccountServiceImpl implements EmpaccountService {
    @Autowired
    public EmpaccountMapper mapper;

    public List<Empaccount> findbyidEmpaccount(int empno) {
        return mapper.findbyidEmpaccount(empno);
    }

    public void insertEmpaccount(Empaccount empaccount) {
mapper.insertEmpaccount(empaccount);
    }

    // 修改密码
    public int updateEmpaccount(Integer empno,String password) {
    return mapper.updateEmpaccount(empno,password);
    }

    public void deleteEmpaccount(int empno) {
mapper.deleteEmpaccount(empno);
    }
}
